package com.woniuxy.life.filesystem.api.feign.factory;

import com.woniuxy.life.filesystem.api.feign.RemoteMinIoUploadService;
import com.woniuxy.life.filesystem.api.feign.fallback.RemoteMinIoUploadServiceFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;


@Component
public class RemoteMinIoUploadServiceFallbackFactory implements FallbackFactory<RemoteMinIoUploadService> {
    @Override
    public RemoteMinIoUploadService create(Throwable throwable) {
        RemoteMinIoUploadServiceFallbackImpl impl = new RemoteMinIoUploadServiceFallbackImpl();
        impl.setCause(throwable);
        return impl;
    }
}
